package com.project.service;

import java.util.List;

import com.project.dao.NoteDao;
import com.project.entity.Contactnote;
import com.project.util.DateUtil;
import com.project.util.PKUtil;

public class NoteService {
	NoteDao nd=new NoteDao();
	public List<Contactnote> findAllNoteByContactid(String cid) {
		
		
		return nd.findAllNoteByContactid(cid);
	}
	public void save(String cid, String userid,String cont) {
		Contactnote cn=new Contactnote();
		cn.setCont(cont);
		cn.setContactid(cid);
		cn.setCreatetime(DateUtil.getNow());
		cn.setId(PKUtil.getId());
		cn.setUserid(userid);
		nd.save(cn);
		
	}
	public List<Contactnote> findAllNoteByUserid(String userid) {

		
		return nd.findAllNoteByUserid(userid);
	}

}
